package com.bw.ppjokeplay.commen.network

import com.bw.ppjokeplay.mvvm.model.entity.*

import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/10 0010 上午 10:14
 *
 */
interface Api {
        companion object{
            const val BASEURL : String ="http://123.56.232.18:8080/serverdemo/"
        }

        @GET("feeds/queryHotFeedsList")
        fun requestHomeList(@Query("feedId")feedId:Int,
                            @Query("feedType")feedType:String,
                            @Query("pageCount")pageCount:Int,
                            @Query("userId")userId:Int):Observable<HomeFeedEntity>

        @GET("comment/queryFeedComments")
        fun requestComments(
                            @Query("id")id:Int,
                            @Query("itemId")itemId:Long,
                            @Query("pageCount")pageCount:Int,
                            @Query("userId")userId:Int):Observable<CommentsEntity>
        @POST("comment/addComment")
        fun requestaddComments(
                            @Query("commentText")commentText:String,
                            @Query("height")height:Int,
                            @Query("image_url")image_url:String,
                            @Query("itemId")itemId1:Long,
                            @Query("userId")userId1:Int,
                            @Query("video_url")video_url:String,
                            @Query("width")width:Int):Observable<AddCommentsEntity>

        @GET("tag/queryTagList")
        fun requestTagList(
                            @Query("offset")offset:Int,
                            @Query("pageCount")pageCount:Int,
                            @Query("tagId")tagId:Int,
                            @Query("tagType")tagType:String,
                            @Query("userId")userId:Int):Observable<TagEntity>
        @GET("tag/toggleTagFollow")
        fun requestAddTagList(
                            @Query("tagId")tagId:Int,
                            @Query("userId")userId:Int):Observable<AddTagFollowEntity>
}